package com.yuro.easyfile;

import org.nutz.dao.entity.annotation.*;

import java.util.Date;

/**
 * 文件信息Bean
 * Created by leewell on 2017/3/26.
 */
@Table("yrm_file_info")
public class FileEntity {

    @Column("id")
    @Id(auto = false)
    public long id;

    @Column("ori_name")
    @Comment("原文件名")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    public String originalName;

    @Comment
    @Column("crt_tm")
    public String createTime;

    @Column("type")
    @Comment("文件类型")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    public String type;

    @Column("sfx")
    @Comment("扩展名")
    @ColDefine(type = ColType.VARCHAR, width = 10)
    public String suffix;

    @Column("len")
    @Comment("文件大小")
    public long length;

    @Column("path")
    @Comment("文件路径")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    public String path;

    public FileEntity(long id) {
        this.id = id;
    }

    public FileEntity(long id, String original) {
        this.id = id;
        this.originalName = original;
    }

    public FileEntity() {

    }
}
